#include "beep.h"
#include <QDebug>

Beep::Beep()
{

}

Beep::~Beep()
{

}

void Beep::beepON()
{
    QFile file;
    file.setFileName("/sys/devices/platform/leds/leds/beep/brightness");
    if(!file.open(QIODevice::ReadWrite))
        qDebug()<<file.errorString();
    file.write("1");
    file.close();
}

void Beep::beepOFF()
{
    QFile file;
    file.setFileName("/sys/devices/platform/leds/leds/beep/brightness");
    if(!file.open(QIODevice::ReadWrite))
        qDebug()<<file.errorString();
    file.write("0");
    file.close();
}
